package com.hsp.demo_06_object;

public class Demo_05 {
    public static void main(String[] args) {
        Person_05 jack = new Person_05("jack", 18);

        System.out.println(jack);
    }
}

class Person_05{
    private String name;
    private int age;

    public Person_05(String name, int age){
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person_05{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}